package com.amado.course03;


/**
 * 类型强制转换
 * Created by Administrator on 2018\4\3 0003.
 */
public class IntegerDataTypeSwitch {
    public static void main(String[] args) {
        int myAge = 11;
        short youAge = 22;
        myAge = youAge;
        //自动转换为int类型
        int allAge = myAge+youAge;
        //强制转换类型用(类型)，大整型的变量要强制转换为小整型才能赋值
        short sumAge = (short) myAge;
      
    }
}
